using System;
using System.Collections.Generic;
using System.Text;
namespace BLL.BusinessLayer
{
	[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
	[Serializable]
	public class ClsQuizzes: BusinessObjectBase
	{

		public ClsQuizzes() {}

		#region InnerClass
		public enum ClsQuizzesFields
		{
			QuizID,
			QuizName,
			Tags,
			Description,
			UserID,
			CategoryID,
			Media,
			Attemps,
			Createdate,
			IsPrivate,
			DownloadCount
		}
		#endregion

		#region Data Members

			int _quizID;
			string _quizName;
			string _tags;
			string _description;
			int? _userID;
			int? _categoryID;
			string _media;
			int? _attemps;
			DateTime? _createdate;
			int? _isPrivate;
			int? _downloadCount;

		#endregion

		#region Properties

		public int  QuizID
		{
			 get { return _quizID; }
			 set
			 {
				 if (_quizID != value)
				 {
					_quizID = value;
					 PropertyHasChanged("QuizID");
				 }
			 }
		}

		public string  QuizName
		{
			 get { return _quizName; }
			 set
			 {
				 if (_quizName != value)
				 {
					_quizName = value;
					 PropertyHasChanged("QuizName");
				 }
			 }
		}

		public string  Tags
		{
			 get { return _tags; }
			 set
			 {
				 if (_tags != value)
				 {
					_tags = value;
					 PropertyHasChanged("Tags");
				 }
			 }
		}

		public string  Description
		{
			 get { return _description; }
			 set
			 {
				 if (_description != value)
				 {
					_description = value;
					 PropertyHasChanged("Description");
				 }
			 }
		}

		public int?  UserID
		{
			 get { return _userID; }
			 set
			 {
				 if (_userID != value)
				 {
					_userID = value;
					 PropertyHasChanged("UserID");
				 }
			 }
		}

		public int?  CategoryID
		{
			 get { return _categoryID; }
			 set
			 {
				 if (_categoryID != value)
				 {
					_categoryID = value;
					 PropertyHasChanged("CategoryID");
				 }
			 }
		}

		public string  Media
		{
			 get { return _media; }
			 set
			 {
				 if (_media != value)
				 {
					_media = value;
					 PropertyHasChanged("Media");
				 }
			 }
		}

		public int?  Attemps
		{
			 get { return _attemps; }
			 set
			 {
				 if (_attemps != value)
				 {
					_attemps = value;
					 PropertyHasChanged("Attemps");
				 }
			 }
		}

		public DateTime?  Createdate
		{
			 get { return _createdate; }
			 set
			 {
				 if (_createdate != value)
				 {
					_createdate = value;
					 PropertyHasChanged("Createdate");
				 }
			 }
		}

		public int?  IsPrivate
		{
			 get { return _isPrivate; }
			 set
			 {
				 if (_isPrivate != value)
				 {
					_isPrivate = value;
					 PropertyHasChanged("IsPrivate");
				 }
			 }
		}

		public int?  DownloadCount
		{
			 get { return _downloadCount; }
			 set
			 {
				 if (_downloadCount != value)
				 {
					_downloadCount = value;
					 PropertyHasChanged("DownloadCount");
				 }
			 }
		}


		#endregion

		#region Validation

		internal override void AddValidationRules()
		{
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("QuizID", "QuizID"));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("QuizName", "QuizName",100));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Tags", "Tags",500));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Description", "Description",1000));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Media", "Media",1000));
		}

		#endregion

	}
}
